<%@taglib prefix="s" uri="/struts-tags"	%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<article>
	<div onload='document.f.j_username.focus();'>
		<h2><s:text name="login.title"/></h2>
		
		<s:if test="hasActionMessages()">
			<s:actionmessage />
		</s:if>
		<s:if test="hasActionErrors()">
			<s:actionerror />
		</s:if>
	
		<c:if test="${param.loginError == 'true'}">
			<div class="errorblock">
				<p><s:text name="login.failure"/> ${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message}</p>
			</div>
		</c:if>
	
		<form name='f' action="<c:url value='j_spring_security_check' />" method='POST'>
			<table>
				<tr>
					<td><s:text name="general.user"/>:</td>
					<td><input type='text' name='j_username' value=''></td>
				</tr>
				<tr>
					<td><s:text name="general.password"/>:</td>
					<td><input type='password' name='j_password' /></td>
				</tr>
				<tr>
					<td colspan='2'><input name="submit" type="submit" value="Submit" /></td>
				</tr>
				<tr>
					<td colspan='2'><input name="reset" type="reset"  value="Reset"/></td>
				</tr>
			</table>
		</form>
	</div>
</article>